/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package model;

/**
 *
 * @author Max
 */
public class Tupel {
    
    private final String[] daten;
    
    private int haeufigkeit;
    
    public Tupel(String[] daten) {
        this.daten = daten;
    }
    
    public void setHaeufigkeit(int p) {
        haeufigkeit = p;
    }
    
    public int getHaeufigkeit() {
        return haeufigkeit;
    }
    
    public String[] getDaten() {
        return daten;
    }
    
    @Override
    public boolean equals(Object object) {
        boolean returnValue=false;
        Tupel tupel;
        if (object instanceof Tupel) {
            tupel = (Tupel) object;
        } else {
            return returnValue;
        }
        for (int i=0; i < tupel.getDaten().length; i++) {
            if (tupel.getDaten()[i].equals(daten[i]) == false) {
                return returnValue;
            }
        }
        returnValue = true;
        return returnValue;
    }
    
    public void increase() {
        haeufigkeit++;
    }
    
}
